<template>
    <div ref="xw">
        <van-button @click="add">2222</van-button>
        <div v-for="item in data" :key="item" :id="'a'+item">{{item}}</div>
    </div>
</template>

<script>
export default {
  data () {
    return {
      data: []
    }
  },
  mounted () {
    for (let i = 0; i < 1100; i++) {
      this.data.push(i)
    }
  },
  methods: {
    add () {
      document.getElementById('a60').scrollIntoView()
    }
  }
}
</script>

<style scoped>

</style>
